{% extends "layout.html" %}

{% block title %}Création achat mobile {% endblock %}

{% block content %}

<form method="post" class="form-horizontal" >

	<div class="row">
	<div class="span11">
	<a href="vente-option-mobile" class="btn btn btn-primary"><i class="icon-plus-sign icon-white"></i> Voir la liste </a>
    
	  <fieldset>
		<legend align="center">Nouvelle option de vente</legend>
    
    
	  </fieldset>
    </div>
	 <!-- Premi�re colonne -->
	<div class="span5">
    
	  <fieldset>
      
	{% if choix_offre ==""  %} 
    <div class="control-group">
		<label class="control-label" for="choix_offre">Offre de Base</label>
		<div class="controls">
		   <select name="choix_offre" size="1" onchange='submit()'/>
           	<option value="">Choississez...</option>
           {% for offre in offres %}
			  <option value="{{offre.id}}">{{offre.nom}}</option>
            {% endfor %}   
			</select>
		</div>
	  </div>
	 {% else %}
      <div class="control-group">
		<label class="control-label" for="code_article">Code Article</label>
        <div class="controls">
		<div class="input-prepend">
		   <input name="code_article" type="text" value="" placeholder="{{offre_choisie.0.code_article}}"/>
           <input name="temps" type="hidden" value=""/> 
           <input name="jours" type="hidden" value=""/> 
           <input name="horaires" type="hidden" value=""/>  
		</div>
	  </div>
	  </div>
	  
	  <div class="control-group">
		<label class="control-label" for="famille">Choix de la famille option</label>
		<div class="controls">
		   <select name="famille" size="1">
		   <option value="">Selectionnez...</option>
			  <option value="sms">SMS</option>
			  <option value="data">DATA</option>
			  <option value="bb">Blackberry</option>
			  <option value="international">International</option>
			  <option value="interne">Appel interne</option>
               
               <option></option>
			</select>
		</div>
	  </div>
	  
      
	  <div class="control-group">
		<label class="control-label" for="nom">Nom </label>
        <div class="controls">
		<div class="input-prepend">
		   <input name="nom" type="text" value="" placeholder="{{offre_choisie.0.nom}}"/> 
		   <input name="id_option_ha" type="hidden" value="{{offre_choisie.0.id}}" placeholder=""/> 
		</div>
	  </div>
	  </div>
      
      
	   <div class="control-group">
		<label class="control-label" for="sms">SMS </label>
		 <div class="controls">
         <div class="input-prepend">
		   <input name="sms" type="text" value="{{offre_choisie.0.sms}}" placeholder=""/> 
		</div>
        </div>
	  </div>
	  
	   <div class="control-group">
		<label class="control-label" for="data">DATA</label>
		<div class="controls">
		   <input name="data" type="text" value="{{offre_choisie.0.data}}" placeholder=""/> 
		</div>
		</div>
		<div class="control-group">
		<label class="control-label" for="bb">BlackBerry</label>
		<div class="controls">
		   <input name="bb" type="text" value="{{offre_choisie.0.bb}}" placeholder=""/> 
		</div>
	  </div>
	  
	  <div class="control-group">
		<label class="control-label" for="international">International</label>
		<div class="controls">
		   <input name="international" type="text" value="{{offre_choisie.0.international}}" placeholder=""/> 
		</div>
	  </div>
    
      <div class="control-group">
		<label class="control-label" for="prix_seul">Prix seul </label>
		<div class="controls">
		   <input name="prix_seul" type="text" value="" placeholder="Prix d'achat: {{offre_choisie.0.prix_seul|number_format(2, '.', ' ')}}"/> 
		</div>
	  </div>
      	
      <div class="control-group">
		<label class="control-label" for="prix_avec_equipement">Prix avec équipement</label>
        <div class="controls">
		<div class="input-prepend">
           <input name="prix_avec_equipement" type="text" value="" placeholder="Prix d'achat: {{offre_choisie.0.prix_avec_equipement|number_format(2, '.', ' ')}}"/> 
		</div>
	  </div>
	  </div>
	
	  {% endif %}

	</fieldset>

	</div>
	</div>
	
	{% if choix_offre !=""  %}
		<div class="form-actions">
		<span>Action après validation</span>
		<br/>
		  <select name="action">
			<option value="vente-option-mobile">Afficher la liste </option>
			<!--<option value="">Créer une commande pour un client</a></option>-->
			<option value="vente-option-mobile-creation">Saisir une nouvelle offre</option>
		  </select>
		<br/><br/>
         
		<button type="submit" class="btn btn-primary" name="creation">Création</button>
        <button type="reset" class="btn " name="annuler">Annuler</button>
        
		</div>
	{% endif %}
	
</form>

{% endblock %}
	
